package at.ac.tuwien.prog.compiler;

import at.ac.tuwien.prog.command.ICommand;
import at.ac.tuwien.prog.entity.Register;
import at.ac.tuwien.prog.entity.Software;

/**
 * transforms software/commands into its bit representation.
 * 
 * @author christoph.pickl@student.tuwien.ac.at
 */
public interface ICompiler {

	/**
	 * transforms given software into its bit representation.
	 * 
	 * @param software which should be transformed
	 * @return byte array, size is 4 * commands.length (4 ... each command 1 int = 4 byte = 32 bit)
	 */
	byte[] compileSoftware(Software software);
	
	/**
	 * compile a single command to its bit representation.
	 * 
	 * @param command which should be compiled
	 * @return register, containing complete command data
	 */
	Register compileSingleCommand(ICommand command);

}
